﻿namespace Shanda.DevFx.Security.Web.Pages
{
    using System;
    using System.Web.UI;
    using System.Web.UI.WebControls;

    public class ErrorPage : Page
    {
        protected Label lblMessage;

        protected virtual void InitData()
        {
            this.lblMessage.set_Text(string.Format("<font size=+1 color=red><b>有错误发生，请稍后重试，谢谢！（此错误已记录，严重的错误系统将自动发送给系统管理员）</b></font><br><br>\r\n\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t<li>错误代码：{0}\r\n\t\t\t\t\t\t<li>错误等级：{1}\r\n\t\t\t\t\t\t<li>错误描述：{2}\r\n\t\t\t\t\t\t<li>错误序列号：{3}\r\n\t\t\t\t\t\t<li>发生错误的页面地址：{4}\r\n\t\t\t\t\t</ul>", new object[] { base.get_Request().get_QueryString()["ec"], base.get_Request().get_QueryString()["level"], base.get_Request().get_QueryString()["msg"], base.get_Request().get_QueryString()["hc"], base.get_Request().get_QueryString()["url"] }));
        }

        private void InitializeComponent()
        {
        }

        protected override void OnInit(EventArgs e)
        {
            this.InitializeComponent();
            base.OnInit(e);
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            this.InitData();
        }
    }
}

